﻿<phone:PhoneApplicationPage
    x:Class="QuickWeb.RSSNews"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:QuickWeb;assembly=QuickWeb"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True"
    shell:SystemTray.Opacity="0.0"
    >


    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:SlideTransition  Mode="SlideRightFadeIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:SlideTransition Mode="SlideRightFadeIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:SlideTransition Mode="SlideLeftFadeOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:SlideTransition Mode="SlideLeftFadeOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>
    

    <phone:PhoneApplicationPage.Resources>
        <!--<local:RSSTextTrimmer x:Key="RssTextTrimmer"/>-->
        
        <DataTemplate x:Name="ArticlePreviewTemplate">
            <StackPanel>
                <toolkit:ContextMenuService.ContextMenu>
                    <toolkit:ContextMenu>
                        <toolkit:MenuItem  
                            Header="{Binding Path=LocalizedResources.addToClips, Source={StaticResource LocalizedStrings}}" 
                            Click="AddToReadingList_Click"/>
                    </toolkit:ContextMenu>
                </toolkit:ContextMenuService.ContextMenu>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Image Source="{Binding ImagePath}"  Grid.Row="1">
                    </Image>
                    <TextBlock 
                        Text="{Binding Title}"                     
                        TextWrapping="Wrap" 
                        Style="{StaticResource JumpListAlphabetSmallStyle}" 
                        VerticalAlignment="Top"     
                        Grid.Row="0"
                    />
                </Grid>
                <Grid>                    
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <!--<Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>-->
                    <TextBlock 
                        Grid.Row="0"
                        Text="{Binding PublicationDateAndAuthor}"    
                        TextWrapping="Wrap" 
                        Style="{StaticResource PhoneTextSmallStyle}" 
                        HorizontalAlignment="Left" Margin="0,0,12,0" 
                    />
                    <TextBlock 
                        Grid.Row="1"
                        Text="{Binding PreviewDescription}"    
                        TextWrapping="Wrap" Margin="0,0,0,36"                          
                    />
                    
                    
                    <!--<Button Grid.Row="0" Grid.Column="1" Background="{StaticResource PhoneAccentBrush}"/>
                    <Button Grid.Row="1" Grid.Column="1" Background="{StaticResource PhoneAccentBrush}"/>-->
                    

                </Grid>
                
                
            </StackPanel>
            
        </DataTemplate>



        <!--<local:FeedArticleDataList x:Name="listaEjemploDePreviewArticulos">
            <local:FeedArticleData 
                Title="Army Men Erasers Bravely Fight the War On Error"
                PreviewDescription="When you're a student suffering through a boring and seemingly unending lecture, anything at your disposal can be a distraction. A pencil becomes a rocket, a ruler becomes a sword, and now your erasers can become a small battalion of brave soldiers fighting boredom and mistakes."
                ImagePath="/Assets/DefaultArticleImage.jpg"
                PublicationDate="Ayer"
            />
            <local:FeedArticleData 
                Title="A 4-Year-Old Android Bug Could Bring Malware to 99% of Devices"
                PreviewDescription="A team of security researchers claim to have identified a four-year-old Android bug that can allow malicious trojans to appear as verified apps, infecting devices with malware while users remain unaware of its presence."
                
            />
            <local:FeedArticleData 
                Title="All the Google Products That Google Itself Has Killed Dead"
                PreviewDescription="Google is responsible for giving birth to tools that have changed the entire world: Google search, Gmail, Android and so forth. It should be celebrated! However, Google is also responsible for the death of many of its own products as it re-focuses its priorities: Google Labs, Google Reader and many other less"
                ImagePath="/Assets/DefaultArticleImage3.jpg"
            />
            <local:FeedArticleData 
                Title="Keep Your Eyes on the Sky for Tonight's Gigantic Supermoon"
                PreviewDescription="If there's ever a night to let the moon hit your eye like a big pizza pie, it's amore tonight. If you go gaze into the abyss over head this evening, you'll be treated to a supermoon"
                ImagePath="/Assets/DefaultArticleImage4.jpg"
            />
        </local:FeedArticleDataList>-->


    </phone:PhoneApplicationPage.Resources>


            <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <!--Poner el contenido aqui-->
        <Grid>
            
        
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <StackPanel Grid.Row="0" HorizontalAlignment="Stretch" Margin="0,0" >
                <TextBlock                     
                    Style="{StaticResource PhoneTextAccentStyle}"                    
                    x:Name="FeedSourceTitle"     
                    TextWrapping="Wrap" 
                    Tap="CheckWebsiteButton_Tap"
                />
                
            </StackPanel>

            <!--ContentPanel - place additional content here-->
            <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0" >
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <ListBox 
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    Grid.Row="0"
                    ItemTemplate="{StaticResource ArticlePreviewTemplate}" 
                    x:Name="FeedsSourceList"                     
                    HorizontalAlignment="Stretch"
                    HorizontalContentAlignment="Stretch"        
                    Tap="FeedsSourceList_Tap"
                    
                />
                <!--<Button
                    Grid.Row="1"
                    Background="Transparent" 
                    Content="{Binding Path=LocalizedResources.checkWeb, Source={StaticResource LocalizedStrings}}"
                    BorderBrush="Transparent"
                    BorderThickness="0"
                    Tap="CheckWebsiteButton_Tap"
                />-->
            </Grid>

        </Grid>



        <!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" IsHitTestVisible="False" />-->
    </Grid>

</phone:PhoneApplicationPage>